import React, { Component } from 'react';
import Icon from 'react-native-vector-icons/Ionicons';
import {
  AppRegistry,
  StyleSheet,
  Text,
  View,
  TabBarIOS,
  WebView
} from 'react-native';

export default class TolietMap extends Component{
  constructor(props){
      super(props);
      this.state={
        url:'https://www.baidu.com/'
      }
  }

  render(){
      return (
         <View style={styles.container}>
             <WebView
                 automaticallyAdjustContentInsets={false}
                 style={styles.webView}
                 source={{uri: this.state.url}}
                 javaScriptEnabled={true}
                 domStorageEnabled={true}
                 decelerationRate="normal"
                 //onNavigationStateChange={this.onNavigationStateChange}
                // onShouldStartLoadWithRequest={this.onShouldStartLoadWithRequest}
                 startInLoadingState={true}
                 //scalesPageToFit={this.state.scalesPageToFit}
                 />
         </View>

      )
  }


}

const styles = StyleSheet.create({
    container:{
      flex:1,
    },
    webView:{
      flex:1,
    }

});
